import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import vue from "@vitejs/plugin-vue";
const excludeComponents = ["LightIcon", "DarkIcon","LayJsonSchemaForm"];
import fs from "fs";


export default defineConfig({
    plugins: [
        laravel({
            input: [
                "./resources/js/admin/main.ts",
                "./resources/js/h5/main.ts",
            ],
            refresh: true,
        }),
        vue({
            template: {
                transformAssetUrls: {
                    base: null,
                    includeAbsolute: false,
                },
            },
        }),
    ],
    server: {
        origin: 'https://finance.hedaochaincloud.com:3002',
        host:"0.0.0.0",
        port: 3002,
        cors: true,
        https: {
            key: fs.readFileSync('./privkey.key'),
            cert: fs.readFileSync('./fullchain.pem'),
        },
    },
});
